The present invention relates to image processing apparatus and method for executing image processing by extracting a main subject such as the face of a person in an image based on image data.
A printer that adopts digital exposure has recently been commercialized. In this “digital photoprinter”, the image recorded on a film is read photoelectronically and converted into digital image data, which is subjected to various kinds of image processing to produce recording image data; and a light-sensitive material is scan exposed with recording light modulated in accordance with the output image data so as to record a (latent) image that is then processed photoelectronically to produce a (finished) print.
In the digital photoprinter, when image data obtained by digital exposure is printed, the exposing condition of the image data can be determined by processing the image data. Thus, prints of high quality, which cannot be heretofore obtained by the conventional direct exposure, can be obtained by preferably correcting, by means of such digital photoprinter, washed-out highlight of image and dull shadow of image due to photography with backlight or an electronic flash as well as executing graininess suppression processing for suppressing a rough surface (grainy state) that is outstanding in a low image density region due to a light-sensitive material, sharpness emphasis processing (sharpening processing), and the like. Further, correction of improper color due to red-eye, trimming processing, and the like can be easily executed. The red-eye means such a phenomenon that when a person is recorded from a front side using light emitted from an electronic flash, his or her pupils are recorded in red or gold (pupils recorded in gold is also called red-eye). This phenomenon is caused in such a manner that the light from the electric flash is incident on the pupils from the front in the state that the pupils are open and then reflected thereby regularly.
As a method of correcting the red-eye, JP 2000-76427, A, for example, discloses a method of extracting a red-eye region and a method of correcting the color of this region. According to the disclosure, in an x-y-z space, which is composed of an x-y plane, on which an image region including an eye region whose color is faulty is plotted, and a z-axis representing image characteristic amounts determined by any one of the hue, saturation, and lightness of each pixel in the image region or a combination of at least two thereof, the image region is separated to small regions in which the value of the z-axis has a mountain-like distribution. Then, the region of a pupil whose color is faulty is determined using the shape information, position information, area information, statistic image characteristic amounts, and the like of the respective small separate regions on the x-y plane, and the color of the region is corrected. According this method, it is possible to select only the region whose color must be corrected as a color correction required region, and in particular, it is possible to correctly select only the region of the pupil.
However, it is impossible to correct all the red-eyes even by this method. Further, since a region is erroneously extracted as a region whose color is to be corrected, it is necessary for an operator to confirm a result of color correction. Thus, a region corresponding to the eye portion of a person in an image must be displayed on a monitor, and the like in enlargement.
Incidentally, to display the region corresponding to the eye portion to be confirmed by displaying the image in enlargement, it is necessary to move the region corresponding to the eye portion to be confirmed to the center of the image displayed while enlarging and scrolling the region. Thus, the confirmation of the color correction executed in the region corresponding to the eye portion takes a relatively long time. Accordingly, in an image in which many persons are recorded, a problem is arisen in that a long time is consumed in the confirmation of the color correction and a processing efficiency drops.
This problem is also arisen similarly in freckle and wrinkle removing processing and further in trimming processing for outputting a print with the image of a person disposed at the center of print in enlargement, in addition to the red-eye color correction processing for confirming a small region in an image.